package org.lex.net.event;

import java.io.OutputStream;
import java.io.PrintWriter;

public class StreamProtocolListener implements ProtocolListener {
	private final PrintWriter out;

	public StreamProtocolListener(OutputStream out) {
		this.out = new PrintWriter(out, true);
	}

	public void commandSent(ProtocolEvent e) {
		out.println("[SEND] " + e.getMessage());
	}

	public void replyReceived(ProtocolEvent e) {
		out.println("[RECV] " + e.getMessage());
	}
}
